package cn.pku.sirx.snad.ads.context;

import java.util.Map;

import cn.pku.sirx.snad.ad.model.UserContext;

/**
 * @author WangXiao
 */
public abstract class AbstractUserContextFactory {

	/*
	 * keys of user context map
	 */
	public static final String USER_ID = "userId";
	public static final String USER_IP = "userIp";
	public static final String PAGE_TITLE = "title";
	public static final String PAGE_DOMAIN = "domain";
	public static final String PAGE_URL = "url";
	public static final String PAGE_REFERER = "referer";
	public static final String PAGE_SUMMARY = "summary";

	/**
	 * Get a user context by user context map.
	 * 
	 * @param userContextMap
	 *            a map of user context key-values
	 * @return a user context by user context map
	 */
	public abstract UserContext getUserContext(
			Map<String, String> userContextMap);

}
